import 'package:flutter/material.dart';

class CloudPan extends StatefulWidget {
  @override
  _CloudPanState createState() => _CloudPanState();
}

class _CloudPanState extends State<CloudPan>
    with WidgetsBindingObserver, AutomaticKeepAliveClientMixin {
  @override
  void initState() {
    super.initState();
    print("进入 云盘---");
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Text(
          "WidgetsBindingObserver, AutomaticKeepAliveClientMixin bool get wantKeepAlive => true;主要是为了防止tab页面每次都重新打开tab页面"),
    );
  }

  @override
  // TODO: implement wantKeepAlive
  bool get wantKeepAlive => true;
}
